package org.lanqiao.music.web.controller;

import org.lanqiao.music.system.service.UserAlbumService;
import org.lanqiao.music.system.vo.AllVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/userAlbum")
public class UserAlbumController {
    @Autowired
    private UserAlbumService userAlbumService;
    @GetMapping("/favorites/{userId}")
    public List<AllVo> getUserFavoriteAlbums(@PathVariable Integer userId) {
        return userAlbumService.getUserFavoriteAlbums(userId);
    }
}
